@extends('admin.base.index')
@section('content')
<div class="block-area" id="tableStriped">
                    <h3 class="block-title">商品列表主页</h3>
                    <form action="" method="post" name="myform">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <input type="hidden" name="_method" value="DELETE">
                    </form>
                    <div class="table-responsive overflow">
                        <table class="tile table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <td align="center">id</td>
                                    <td align="center">照片</td>
                                    <td align="center">广告</td>
                                    <td align="center">商品id</td>
                                    <td align="center">版本1</td>
                                    <td align="center">版本2</td>
                                    <td align="center">版本3</td>
                                    <td align="center">版本4</td>
                                    <td align="center">版本5</td>
                                    <td align="center">价格1</td>
                                    <td align="center">价格2</td>
                                    <td align="center">价格3</td>
                                    <td align="center">价格4</td>
                                    <td align="center">价格5</td>
                                    <td align="center">颜色1</td>
                                    <td align="center">颜色2</td>
                                    <td align="center">颜色3</td>
                                    <td align="center">颜色4</td>
                                    <td align="center">颜色5</td>
                                    <td align="center">操作</td>
                                </tr>
                            </thead>
                            <tbody>
                             @foreach($data as $v)
                                <tr>
                                    <td align="center">{{ $v->id }}</td>
                                    <td align="center">{{ $v->pic }}</td>
                                    <td align="center">{{ $v->about }}</td>
                                    <td align="center">{{ $v->goodsdetid }}</td>
                                    <td align="center">{{ $v->version1 }}</td>
                                    <td align="center">{{ $v->version2 }}</td>
                                    <td align="center">{{ $v->version3 }}</td>
                                    <td align="center">{{ $v->version4 }}</td>
                                    <td align="center">{{ $v->version5 }}</td>
                                    <td align="center">{{ $v->price1 }}</td>
                                    <td align="center">{{ $v->price2 }}</td>
                                    <td align="center">{{ $v->price3 }}</td>
                                    <td align="center">{{ $v->price4 }}</td>
                                    <td align="center">{{ $v->price5 }}</td>
                                    <td align="center">{{ $v->color1 }}</td>
                                    <td align="center">{{ $v->color2 }}</td>
                                    <td align="center">{{ $v->color3 }}</td>
                                    <td align="center">{{ $v->color4 }}</td>
                                    <td align="center">{{ $v->color5 }}</td>
                                    <td align="center">
                                        <a href="javascript:doDel({{ $v->id }})">
                                            <button class="btn-info">删除</button>
                                        </a>
                                        <a href="/admin/goodsdet/{{ $v->id }}/edit">
                                            <button class="btn-info">修改</button>
                                        </a>
                                    </td>
                                </tr>
                             @endforeach
                            </tbody>
                        </table>
                        <script type="text/javascript">
                            function doDel(id)
                            {
                                if(confirm('确定要删除吗???')){
                                    var form = document.myform;
                                    form.action = '/admin/goodsdet/'+id;
                                    form.submit();
                                }
                            }
                        </script>
                    </div>
                </div>
@stop
